home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 2.7 KB | 106 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWOSInit.cpp
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWCFMRES_H
- #include "FWCFMRes.h"
- #endif
-
- #ifdef FW_DEBUG
- #ifndef FWEVENTU_H
- #include "FWEventU.h"
- #endif
- #endif
-
- #ifndef FWGRINIT_H
- #include "FWGrInit.h"
- #endif
-
- #ifndef __CODEFRAGMENTS__
- #include <CodeFragments.h>
- #endif
-
- #ifndef __SCRAP__
- #include <Scrap.h>
- #endif
-
- //========================================================================================
- // Runtime Informations
- //========================================================================================
-
- #ifdef FW_BUILD_MAC
- #pragma segment FWOSInit
- #endif
-
- //========================================================================================
- // Prototypes
- //========================================================================================
-
- #if defined(SYMANTEC_CPLUS) && defined(FW_BUILD_MAC)
- #define FW_OSCFMINIT PartCFMInit
- #define FW_OSSOMInit main
- #if !FW_LIB_EXPORT_PRAGMAS
- #pragma internal on
- #endif
- #endif
-
- SOMEXTERN void SOMLINK FW_OSSOMInit (long, long, string );
- extern "C" pascal OSErr FW_OSCFMINIT (CFragInitBlockPtr initBlkPtr);
-
- #if GENERATINGPOWERPC
- #ifdef __MWERKS__
- extern "C" void __sinit();
- #elif defined __MRC__
- extern "C" void __CPlusInit();
- #endif
- #endif
-
- //========================================================================================
- // Initialization functions
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // FW_OSSOMInit
- //----------------------------------------------------------------------------------------
-
- SOMEXTERN void SOMLINK FW_OSSOMInit (long majorVersion,
- long minorVersion,
- string className)
- {
- }
-
- //----------------------------------------------------------------------------------------
- // FW_OSCFMINIT
- //----------------------------------------------------------------------------------------
-
- extern "C" pascal OSErr FW_OSCFMINIT (CFragInitBlockPtr initBlkPtr)
- {
- #ifdef FW_DEBUG
- if (::FW_IsCommandKeyPressed())
- DebugStr("\p FW_OSCFMINIT");
- #endif
-
- // Shared libraries don't get there static objects initialized correctly without
- // calling __sinit or __CPlusInit for MetroWerks or MrC respectively.
-
- #if GENERATINGPOWERPC
- #ifdef __MWERKS__
- __sinit();
- #elif defined __MRC__
- __CPlusInit();
- #endif
- #endif
-
- OSErr err = InitLibraryResources(initBlkPtr);
-
- if (err == noErr)
- InitGraphic();
-
- return err;
- }
-